<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>数据绑定</title>
    <!--引入Vue-->
    <script type="text/javascript" src="../js/vue.js"></script>
</head>
<body>
    <div class="root">
        单向数据绑定:<input type="text" name="name" id="" :value="name">
        <hr>
        双向数据绑定:<input type="text" name="name" id="" v-model:value="name">
        <hr>
        <!--
            v-model只能应用在表单类元素上(输入类元素)
        -->
        双向数据绑定(简写):<input type="text" name="name" id="" v-model="name">
    </div>
</body>

<script type="text/javascript">
    new Vue({
        el:'.root',
        data:{ 
            name:'Jack'
        }
    })
</script>
</html>